package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * FilterListId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class FilterListId implements java.io.Serializable {

	// Fields

	private String keyword;
	private String reason;
	private long time;
	private short class_;

	// Constructors

	/** default constructor */
	public FilterListId() {
	}

	/** minimal constructor */
	public FilterListId(String keyword, short class_) {
		this.keyword = keyword;
		this.class_ = class_;
	}

	/** full constructor */
	public FilterListId(String keyword, String reason, long time, short class_) {
		this.keyword = keyword;
		this.reason = reason;
		this.time = time;
		this.class_ = class_;
	}

	// Property accessors

	@Column(name = "keyword", unique = true, nullable = false, length = 64)
	public String getKeyword() {
		return this.keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}

	@Column(name = "reason", length = 100)
	public String getReason() {
		return this.reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	@Column(name = "time")
	public long getTime() {
		return this.time;
	}

	public void setTime(long time) {
		this.time = time;
	}

	@Column(name = "class", nullable = false)
	public short getClass_() {
		return this.class_;
	}

	public void setClass_(short class_) {
		this.class_ = class_;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof FilterListId))
			return false;
		FilterListId castOther = (FilterListId) other;

		return ((this.getKeyword() == castOther.getKeyword()) || (this
				.getKeyword() != null && castOther.getKeyword() != null && this
				.getKeyword().equals(castOther.getKeyword())))
				&& ((this.getReason() == castOther.getReason()) || (this
						.getReason() != null && castOther.getReason() != null && this
						.getReason().equals(castOther.getReason())))
				&& (this.getTime() == castOther.getTime())
				&& (this.getClass_() == castOther.getClass_());
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getKeyword() == null ? 0 : this.getKeyword().hashCode());
		result = 37 * result
				+ (getReason() == null ? 0 : this.getReason().hashCode());
		result = 37 * result + (int) this.getTime();
		result = 37 * result + this.getClass_();
		return result;
	}

}